import { defineStore } from "pinia";
import { ref } from "vue";
import { getBlogSettingsDetail } from "@/api/frontend/blogsettings";

export const useBlogSettingsStore = defineStore('blogsettings', ()=>{
    // 设置博客信息
    const blogSettings = ref({})

    // 获取博客详情
    const getBlogSettings = async() => {
        const res = await getBlogSettingsDetail()
        if(res.success) {
            blogSettings.value = res.data
        }
    }

    return {
        blogSettings,
        getBlogSettings
    }
})